//
//  ImgModelCell.m
//  CarHome
//
//  Created by 蒋寒霄 on 14-9-24.
//  Copyright (c) 2014年 WJN_work@163.com. All rights reserved.
//

#import "ImgModelCell.h"

@implementation ImgModelCell

- (void)dealloc
{
    [super dealloc];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        [self createView];
    }
    return self;
}

- (void)createView
{
    _title = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 300, 20)];
    _title.font = [UIFont systemFontOfSize:18];
    [self.contentView addSubview:_title];
    [_title release];
    //左图片
    _leftImg = [[UIImageView alloc] initWithFrame:CGRectMake(_title.frame.origin.x, _title.frame.origin.y + _title.frame.size.height + 10, 96, 72)];
    _leftImg.backgroundColor = [UIColor grayColor];
    [self.contentView addSubview:_leftImg];
    [_leftImg release];
    //居中图片
    _centerImg = [[UIImageView alloc] initWithFrame:CGRectMake(_leftImg.frame.origin.x + _leftImg.frame.size.width + 6, _leftImg.frame.origin.y, 96, 72)];
    _centerImg.backgroundColor = [UIColor cyanColor];
    [self.contentView addSubview:_centerImg];
    [_centerImg release];
    //右图片
    _rightImg = [[UIImageView alloc] initWithFrame:CGRectMake(_centerImg.frame.origin.x + _centerImg.frame.size.width + 6, _centerImg.frame.origin.y, 96, 72)];
    _rightImg.backgroundColor = [UIColor cyanColor];
    [self.contentView addSubview:_rightImg];
    [_rightImg release];
    
    _moreTitle = [[UILabel alloc] initWithFrame:CGRectMake(_leftImg.frame.origin.x, _leftImg.frame.origin.y + _leftImg.frame.size.height + 10, 300, 15)];
    _moreTitle.font = [UIFont systemFontOfSize:12];
    _moreTitle.textAlignment = NSTextAlignmentCenter;
    _moreTitle.textColor = myColor_dark;
    [self.contentView addSubview:_moreTitle];
    [_moreTitle release];

}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
